package com.choupin.choupin.admin.entity;

import java.util.Objects;

public class User {
    private  Integer id;//序号
    private String phone;//用户手机号
    private String nickname; //昵称
    private  String icon; //会员图标
    private  Integer  weight; //中奖概率
    private  Integer  prizeCount;//奖品数量

    public User() {
    }

    public User(Integer id, String phone, String nickname, String icon, Integer weight, Integer prizeCount) {
        this.id = id;
        this.phone = phone;
        this.nickname = nickname;
        this.icon = icon;
        this.weight = weight;
        this.prizeCount = prizeCount;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public Integer getPrizeCount() {
        return prizeCount;
    }

    public void setPrizeCount(Integer prizeCount) {
        this.prizeCount = prizeCount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) &&
                Objects.equals(phone, user.phone) &&
                Objects.equals(nickname, user.nickname) &&
                Objects.equals(icon, user.icon) &&
                Objects.equals(weight, user.weight) &&
                Objects.equals(prizeCount, user.prizeCount);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, phone, nickname, icon, weight, prizeCount);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", nickname='" + nickname + '\'' +
                ", icon='" + icon + '\'' +
                ", weight=" + weight +
                ", prizeCount=" + prizeCount +
                '}';
    }
}
